<div class="market-catalog1-view">
<div class="categories-path">
{{foreach cat in categories_path}}<a href="{{action}}cat/{{cat.calc_code}}">{{cat.name}}</a> &gt; {{/foreach}} {{market_item.name}}
</div>
<div class="images">
	<div class="bigimage"><div class="bigimage2">
		{{if market_item_image}}<a href="{{preview(5):market_item_image.url}}"><img src="{{preview(7):market_item_image.url}}/"></a>{{/if}}
		{{unless market_item_image}}<img src="/shared/no-photo.png"/>{{/unless}}
	</div></div>
	{{foreach image in market_item_images}}
		<div class="smallimage"><div class="smallimage2"><a href="{{preview(5):image.url}}"><img src="{{preview(1):image.url}}" title="{{image.name}}" alt="{{image.name}}"/></a></div></div>
	{{/foreach}}
</div>
<div class="info">
<h1>{{market_item.name}}</h1>
<div class="description">{{market_item.description}}</div>
<div class="cart">
	{{if market_item.variants}}
	<h2>{{!header_cart}}</h2>
	<form name="to_cart" action="{{action}}">
	<div class="cart-form">
		<div class="name">
			<select name="item">
				<option value="">{{!choose_model}}</option>{{foreach v in market_item.variants}}<option value="{{v.id}}">{{v.name}}</option>{{/foreach}}
			</select>
		</div>
		<div class="buttons">
			<input type="text" name="amount" value="1" class="amount"/><input type="button" class="add" value="{{!add_to_cart}}" onclick="var frm=document.forms.to_cart;add_to_cart(frm.action,frm.item.options[frm.item.selectedIndex].value,frm.amount.value);"/>
		</div>
		<div style="clear: both;"></div>
	</div>

	{{/if}}
	{{unless market_item.variants}}
	{{if market_item.in_stock}}
	<h2>{{!header_cart}}</h2>
	<form name="to_cart" action="{{action}}">
	<div class="cart-form">
		<div class="name">{{market_item.name}}</div>
		<div class="buttons">
			<input type="text" name="amount" value="1" class="amount"/><input type="button" class="add" value="{{!add_to_cart}}" onclick="var frm=document.forms.to_cart;add_to_cart(frm.action,'{{market_item.id}}',frm.amount.value);"/>
		</div>
		<div style="clear: both;"></div>
	</div>
	</form>
	{{/if}}
	{{unless market_item.in_stock}}
	<h2>{{!header_cart_not_in_stock}}</h2>
	{{!body_cart_not_in_stock}}
	{{/unless}}
	{{/unless}}
</div>
</div>
<div class="params">
	<div class="tab-names">
		<a href="#param-tabs-1">{{!header_short_params}}</a>
		<a href="#param-tabs-2">{{!header_full_params}}</a>
	</div>
	<div class="tab" id="param-tabs-1">
		{{foreach group in market_item.param_groups}}
		{{if group.has_short}}
		<div class="grp"><div class="grp-name">{{group.name}}</div>
			{{foreach param in group.params}}
			{{if param.value}}
				{{if param.show_short}}
				<div class="param"><div class="name">{{param.name}}</div><div class="value">{{param.value}}</div><div style="clear: both;"></div></div>
				{{/if}}
			{{/if}}
			{{/foreach}}
		</div>
		{{/if}}
		{{/foreach}}
	</div>
	<div class="tab" id="param-tabs-2">
		{{foreach group in market_item.param_groups}}
		<div class="grp"><div class="grp-name">{{group.name}}</div>
			{{foreach param in group.params}}
			{{if param.value}}<div class="param"><div class="name">{{param.name}}</div><div class="value">{{param.value}}</div><div style="clear: both;"></div></div>{{/if}}
			{{/foreach}}
		</div>
		{{/foreach}}
	</div>
</div>
</div>
</div>
<script>
init_lightbox('.market-catalog1-view .bigimage .bigimage2 a');
init_lightbox('.market-catalog1-view .smallimage .smallimage2 a');
init_tabs('.market-catalog1-view .tab-names a','.market-catalog1-view .tab');
</script>
